// 获取顶部栏高度
export const statusBarHeight = {
	data() {
		return {
			statusBarHeight:''
		}
	},
	onLoad(options) {
		let that = this;
		uni.getSystemInfo({
			success: function(e) {
				// #ifndef MP
				if (e.platform == 'android') {
					that.statusBarHeight = e.statusBarHeight + 50;
				} else {
					that.statusBarHeight = e.statusBarHeight + 45;
				}
				// #endif
	
				// #ifdef MP-WEIXIN
				let custom = wx.getMenuButtonBoundingClientRect();
				// console.log('e:::', e, e.statusBarHeight);
				that.statusBarHeight = custom.bottom + custom.top - e.statusBarHeight;
				// #endif
	
				// #ifdef MP-ALIPAY
				that.statusBarHeight = e.statusBarHeight + e.titleBarHeight;
				// #endif
			}
		});
	},
}
